{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/header.html"}

<!--header stop-->
{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/common/headerusertitle.html"}
<!--header end-->
<!--content stop-->
<section class="box-user">
    <div class="issue_price">
        <p class="lh24p fs14p">请在下方填写您的<span class="orange">真实报价内容</span>（价格必填）</p>
        <p class="lh24p gray fs14p">例如:HDPE 7000F 伊朗石化25吨 9860元 现货 美金 L/C 60天 宁波</p>
        <select name="business_id" id="business_id" class="input_test business_id">
            {foreach from=$info key=key item=item}
            <option value="{$item.id}" {if $item.is_default == 'Y'}selected{/if}>{$item.business_name}</option>
            {/foreach}
        </select>
        <textarea class="isp_text" name="content"  placeholder="请输入您内容"></textarea>
        <a href="#" class="isp_btn">提交发布</a>
    </div>
</section>
<!--content end-->


{literal}
<script>
    $(function(){
        $(".isp_btn").click(function(){

            var business_id =  $(".business_id :selected").val();
            var remark =  $(".isp_text").val();

            $.ajax({
                url:'/user/supply',
                data:{business_id:business_id,remark:remark},
                type:'POST',
                success:function(data){
                    var data = eval("("+data+")");
                    var code = data.code;
                    var msg = data.msg;
                    if(code == 8){
                        window.location.href = "/user/supplylist";
                    }else{
                        alert(data.msg);
                    }
                    return false;
                },
                dataType:'text'
            });
        });
    });
</script>
{/literal}
{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/footer.html"}
